﻿<UserControl x:Class="Bubbels.Controls.GameOverPane"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
              >

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  Source="../Resources/RoundButtonStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Background="#FFFF00FF">
        <Grid.Resources>
            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource RoundButton}" x:Key="CustomizedRoundButton">
                <Style.Setters>
                    <Setter Property="Background" Value="#FFFF00FF"></Setter>
                </Style.Setters>
                <Style.Triggers>
                    
                    <Trigger Property="IsEnabled" Value="False">
                        <Setter Property="Background" Value="#FF550055"></Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
        
        <Grid.ColumnDefinitions >
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Column="1" Grid.Row="0">
            <Label FontSize="48" Content="Score">               
            </Label>
            <Label  FontSize="72" FontStyle="Oblique" FontFamily="Arial Rounded MT" Content="{Binding Score}" ></Label>
            <StackPanel.Style >
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding}" Value="{x:Null}" >
                            <Setter Property="Label.Visibility" Value="Hidden"></Setter>
                            <Setter Property="StackPanel.Height" Value="0"></Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </StackPanel.Style>
        </StackPanel>
        <Button  x:Name="NewGame"  FontSize="32" Width="180" Height="180"   Content="New Game" Grid.Column="0" Grid.Row="1" Style="{StaticResource CustomizedRoundButton}"  Click="btnNewGame_Click" Opacity="1" />
        <Button  x:Name="RestartGame"  FontSize="32"  Width="180" Height="180" Content="Restart"  Grid.Column="2" Grid.Row="1" Style="{StaticResource CustomizedRoundButton}" Click="RestartGame_Click" Opacity="1" IsEnabled="False">
            
        </Button>
        <Button  x:Name="ExitGame" FontSize="32" Width="180" Height="180" Content="Exit Game"  Grid.Column="2" Grid.Row="2" Style="{StaticResource CustomizedRoundButton}" Click="ExitGame_Click" Opacity="1"></Button>
        <Button  x:Name="Resume" FontSize="32" Width="180" Height="180" Content="Resume"  Grid.Column="1" Grid.Row="1" Style="{StaticResource CustomizedRoundButton}" Click="Resume_Click" Opacity="1" IsEnabled="{Binding GameOver}"></Button>
        <Button  x:Name="Configure" FontSize="32" Width="180" Height="180" Content="Configure"  Grid.Column="1" Grid.Row="2" Style="{StaticResource CustomizedRoundButton}" Opacity="1" IsEnabled="False"></Button>
        <Button  x:Name="Statstics" FontSize="32" Width="180" Height="180" Content="Statstics"  Grid.Column="0" Grid.Row="2" Style="{StaticResource CustomizedRoundButton}" Opacity="1" IsEnabled="False"></Button>
    
    </Grid>
</UserControl>
